//
//  GQArenaViewController.m
//  LotteryProject
//
//  Created by Ezra on 16/5/18.
//  Copyright © 2016年 Ezra. All rights reserved.
//

#import "GQArenaViewController.h"

@interface GQArenaViewController ()

@end

@implementation GQArenaViewController

- (void)loadView
{
    UIImageView *backImageView = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    
    backImageView.image = [UIImage imageNamed:@"NLArenaBackground"];
    
    backImageView.userInteractionEnabled = YES;
    
    self.view = backImageView;
    
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];

    UISegmentedControl *segment = [[UISegmentedControl alloc]initWithItems:@[@"足球",@"篮球"]];
    
    [segment setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentBG"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    [segment setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentSelectedBG"] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
    
    //默认选中第0个
    segment.selectedSegmentIndex = 0 ;
    
    //设置文字颜色
    [segment setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];
    segment.tintColor = [UIColor colorWithRed:0/255.0f green:130/255.0f blue:132/255.0f alpha:1];
    
    self.navigationItem.titleView = segment;

}


@end
